{extend name="public/father" /}


{block name='main'}
<div class="layui-tab layui-tab-card">

	<ul class="layui-tab-title">

		{foreach $system_config as $k=>$v}

		{if $k == 'base'}

		<li {:input('param.group')=='base'||input('param.group') == null?' class="layui-this"':''}>
		<a href="{:url('admin/config/index')}?group={$k}">{$v}</a>
		</li>

		{else /}

		<li {:input('param.group')==  $k  ?' class="layui-this"':''}>
		<a href="{:url('admin/config/index')}?group={$k}">{$v}</a>
		</li>

		{/if}

		{/foreach}

		<li>
			<a class="layui-btn layui-btn-sm" onclick="openUrl('添加', '{:url(\'admin/config/create\',[\'group\'=>$Request.param.group])}', 800);return false;"><i class="layui-icon layui-icon-add-1"></i> 添加</a>
		</li>
	</ul>

	<div class="layui-tab-content" style="background: #FFFFFF;">

		<blockquote class="layui-elem-quote layui-quote-nm">
			<span style="color:#FF5722;font-size: 150%;">
				<i class="layui-icon layui-icon-rate-solid"></i><i class="layui-icon layui-icon-rate-solid"></i><i class="layui-icon layui-icon-rate-solid"></i><i class="layui-icon layui-icon-rate-solid"></i><i class="layui-icon layui-icon-rate-solid"></i>
				此处是系统关键设置，请谨慎操作，如果不懂，请勿进行任何操作！</span>
		</blockquote>

		<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>

		<script type="text/html" id="status">
			{{ d.status==1 ? '已启用' : '<span style="color: orange;">已禁用</span>' }}
		</script>

		<script type="text/html" id="barDemo">
			<div class="layui-btn-group">
				<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>改</a>
				<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="del" data-table="configs"><i class="layui-icon layui-icon-delete"></i>删</a>
			</div>
		</script>

	</div>
</div>
{/block}

{block name="js"}
<script type="text/javascript">
	layui.use(['jquery','table', 'form'], function() {
		var table = layui.table,
				form = layui.form,
				$ = layui.jquery;

		table.render({
			elem: '#dataTable',
			url: "{:url('?group='.input('param.group'))}",
			title: '数据表',
			cellMinWidth: 200,
			limit: 20,
			// height: 'full-360',
			cols: [[
				{field: 'left', title:'操作',	width:120,	align:'center',	toolbar:'#barDemo'},
				{field: 'status',title:'状态',	width:100,	align:'center',	sort:true,	templet:'#status'},
				{field: 'sort',  title:'排序',	width:100,	align:'center',	sort:true},
				{field: 'type',  title:'类型',	width:100,	align:'center',	sort:true},
				{field: 'title', title:'标题',	width:180,	align:'right',	sort:true},
				{field: 'name',  title:'标识',	width:250,	align:'left',	sort:true},
				{field: 'value', title:'默认值'},
				{field: 'tips', title:'配置提示'},
			]],
			page: true
		});

	});

</script>
{/block}
